import org.rsbot.script.util.Timer;

class DebaucherySoulWars$BreakHandler extends Thread
{
  private volatile boolean stop = false;
  private volatile boolean pause = false;

  DebaucherySoulWars$BreakHandler(DebaucherySoulWars paramDebaucherySoulWars) {
  }
  public void run() {
    try { while (!this.stop)
        if (DebaucherySoulWars.access$3400(this.this$0)) {
          long l1 = this.this$0.random(DebaucherySoulWars.access$3800(this.this$0) * 60000, DebaucherySoulWars.access$3700(this.this$0) * 60000);

          long l2 = System.currentTimeMillis();

          while ((l2 + l1 > System.currentTimeMillis()) && (!this.stop)) {
            Thread.sleep(1L);
            DebaucherySoulWars.access$6002(this.this$0, "Taking break in:  " + Timer.format(l2 + l1 - System.currentTimeMillis()));
          }

          DebaucherySoulWars.access$4302(this.this$0, true);
          while ((!DebaucherySoulWars.access$6100(this.this$0)) && (!this.stop)) {
            Thread.sleep(1L);
            DebaucherySoulWars.access$6002(this.this$0, "Taking break after this game");
          }
          long l3 = this.this$0.random(DebaucherySoulWars.access$3600(this.this$0) * 60000, DebaucherySoulWars.access$3500(this.this$0) * 60000);

          long l4 = System.currentTimeMillis();

          while ((l4 + l3 > System.currentTimeMillis()) && (!this.stop)) {
            Thread.sleep(1L);
            DebaucherySoulWars.access$6002(this.this$0, "Taking break for:  " + Timer.format(l4 + l3 - System.currentTimeMillis()));
          }

          DebaucherySoulWars.access$4302(this.this$0, false);
          while ((!DebaucherySoulWars.access$6200(this.this$0)) && (!this.stop)) {
            Thread.sleep(1L);
            DebaucherySoulWars.access$6002(this.this$0, "Logging back in hopefully...");
          }
        }
    }
    catch (Exception localException)
    {
    }
  }
}